<template>
  <div>
    <el-row>
      <el-col :span="2" v-for="(likeItem, index) in likeList" :key="index" :offset="index%8==0?0:1">
        <el-card :body-style="{ padding: '0px' }" shadow="hover" style="margin-bottom: 10px; -webkit-transition-duration:0.3s; -webkit-transition-timing-function:linear; -webkit-transition-delay:0.01s;">
          <like-article :likeItem="likeItem"></like-article>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import {mapState,mapActions,mapGetters} from 'vuex'
import LikeArticle from '../../components/LikeArticle'

  export default {
    name: 'Star',
    data(){
      return{
          userid:this.userInfo.userid
      }
      
    },
    mounted () {
      console.log('000')
      this.recordLikeList(this.userInfo.userid)
      this.inituser()
      console.log(this.userInfo.userid)
    },
    computed:{
      ...mapState(['likeList','userInfo']),
      ...mapGetters([//管理所有的事件
      'begin',
      'end',
      'user'
    ]),

    },
    methods:{
      ...mapActions(['recordLikeList']),
      ...mapActions(['getUserInfo']),
      async inituser(){
        this.recordLikeList(this.userInfo.userid)
        console.log(this.userInfo.userid)
        console.log('123987')
        console.log(this.likeList)
      }
    },
    components:{LikeArticle}
  }
</script>


        LikeArticle<style scoped>

</style>
